﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using PhysicsFmuDeluxeDotNet.Modulos.Mru;
using PhysicsFmuDeluxeDotNet.Modulos.Funcoes;

namespace PhysicsFmuDeluxeDotNet
{
    public partial class Principal : Form
    {
        public Principal()
        {
            InitializeComponent();
        }

        private void vetoresToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Abrir módulo de vetores
            Vetores vetores = new Vetores();
            vetores.Show();
        }

        private void sobreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Mostrar diálogo sobre
            SobrePrincipal sobre = new SobrePrincipal();
            sobre.ShowDialog();
        }

        private void Principal_Load(object sender, EventArgs e)
        {
            //Mostrar versão do programa no título (baseado na versão do assembly)
            this.Text += Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }

        private void sairToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Fechar todas as janelas e sair do programa
            Application.Exit();
        }

        //Página de Einstein (wikipedia)
        private void albertEinsteinToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://pt.wikipedia.org/wiki/Albert_Einstein");
        }

        //Download do .NET Framework 4
        private void nETFramework4ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en");
        }

        //Página do Visual Studio 2010
        private void visualStudio2010ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.microsoft.com/visualstudio/pt-br/visual-studio-2010-launch");
        }

        //Link da FMU
        private void fMUToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://fmu.br/");
        }

        //Página do codeplex
        private void codePlexToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.codeplex.com/");
        }

        //Página do projeto do programa
        private void projetoFmuPhysicsDeluxeDotNetCodeplexToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://physicsfmudeluxe.codeplex.com/");
        }

        //Página do ZedGraph
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://zedgraph.org/wiki/index.php?title=Main_Page");
        }

        //Form MRU
        private void btnMru_Click(object sender, EventArgs e)
        {
            Mru mru = new Mru();
            mru.ShowDialog();
        }

        //Form Funções
        private void btnFuncoes_Click(object sender, EventArgs e)
        {
            Funcoes funcoes = new Funcoes();
            funcoes.Show();
        }
    }
}
